<?php /* HISTORY $Id: index.php,v 1.7 2007/01/31 16:02:50 theideaman Exp $ */

// check permissions
$denyRead = getDenyRead($m);
$denyEdit = getDenyEdit($m);

if ($denyRead) {
	$AppUI->setMsg('Access denied', UI_MSG_ERROR);
	$AppUI->redirect();
}

$TIMECARD_CONFIG = array();
require_once "./modules/timecard/config.php";

// setup the title block
$titleBlock = new CTitleBlock('Task Log');

$titleBlock->show();

if (isset( $_GET['tab'] )) {
	$AppUI->setState('TimecardVwTab', $_GET['tab']);
}
$tab = $AppUI->getState('TimecardVwTab') ? $AppUI->getState('TimecardVwTab') : 0;

$tabBox = new CTabBox("?m=timecard", $tab);
//$tabBox->add('vw_timecard', 'Weekly Time Card');
//$tabBox->add('vw_monthly', 'Monthly');
$tabBox->add('vw_newlog', isset($_GET['tid']) ? 'Edit Log' : 'New Log');
if ($TIMECARD_CONFIG['integrate_with_helpdesk']) {
	$tabBox->add( 'vw_newhelpdesklog', 'Helpdesk Log' );
}
/*if ($TIMECARD_CONFIG['minimum_report_level'] >= $AppUI->user_type) {
	$tabBox->add('vw_calendar_by_user', 'Report');
	//$tabBox->add('vw_reports', 'Overall Reports');
}*/

$tabBox->show();
?>
